package com.hellomeng.bean;

import java.util.HashMap;
import java.util.Map;

public class Bean22Factory {
    private static Map<String,Bean2> beans = new HashMap<>();

    static {
        beans.put("bean1" ,new Bean2());
        beans.put("bean2",new Bean2());
    }

    public static Bean2 getBean(String beanName){
        return beans.get(beanName);
    }
}
